package education.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import education.dao.CourseDao;
import education.model.Course;
import education.model.MajorsInfo;
import education.model.Teacher;
import education.service.CourseManager;

@Component("courseManager")
public class CourseManagerImpl implements CourseManager {
	private CourseDao courseDao;

	public CourseDao getCourseDao() {
		return courseDao;
	}

	@Resource
	public void setCourseDao(CourseDao courseDao) {
		this.courseDao = courseDao;
	}

	public void delete(Course course) {
		// TODO Auto-generated method stub

	}

	public boolean delete(int id) {
		
		return courseDao.delete(id);
	}

	public int getCount() {
		return courseDao.getCount();
	}

	public Course loadById(int id) {

		return courseDao.loadById(id);
	}

	public List<Course> paging(int pageSize, int pageCount, int rowCount) {
		return courseDao.paging(pageSize, pageCount, rowCount);
	}

	public void save(Course course) {
		courseDao.save(course);

	}

	public boolean update(Course course) {
//		System.out.print("CourseManagerImpl");
		return courseDao.update(course);
	}
}
